<?php

namespace App\Http\Controllers;

use App\Model\Goods;
use App\Service\GoodsService;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use GuzzleHttp\Client;

class GoodsController extends BaseController
{
    public function index(){
        return view('goods/index');
      //  return view('index/index');
    }

    //生成补货清单
    public function getLacks(){
        return view('machine/getlack');
    }

    public function selectGoodsByName(Request $request){
        $str_goodName = $request->input('good_name');
        $modelRet = GoodsService::getGoodsByname($str_goodName);
        $ret = [
            'result'=>$modelRet
        ];
        return $ret;
    }
}
